package com.zhuiwei.springbootamqp;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


/**
 * 自动配置有的组件
 * 1、RabbitAutoConfiguration
 * 2、有自动配置了连接工厂ConnectionFactory
 * 3、RabbitProperties 封装了RabbitMQ的配置
 * 4、RabbitTemplate：给RabbitMQ发送和接受消息
 * 5、AmqpAdmim：RabbitMQ系统管理功能组件,创建和删除Queue exchange binding
 *
 * @EnableRabbit 开启基于注解的rabbitmq
 * @EnableRabbit +  @RabbitListener 启动监听消息队列中的消息
 */
@SpringBootApplication
@EnableRabbit
public class SpringBootAmqpApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringBootAmqpApplication.class, args);
	}

}
